﻿#ifndef _NDT_RAWDATA_H
#define _NDT_RAWDATA_H
#include "ndt_algorithm.h"



#define RAWDATA_BACKUP_NUM			30  

//通用滤波
#define SMOOTH_MAX_LEVEL             6

#define SMOOTH_MAX_LEVEL_CH0			30  
#define SMOOTH_MAX_LEVEL_CH1			6  

extern bank3 int gRawdata_Sp[CHANNEL_NUM];
extern bank3 int gRawdata_Sp_Long[CHANNEL_NUM];

extern bank3 int gAdcFilterBackup_ch0[SMOOTH_MAX_LEVEL_CH0];  //滤波缓存数据
extern bank1 int gRawdataBackup_ch0[RAWDATA_BACKUP_NUM];  //rawdata缓存数据

#if CHANNEL_NUM == 2//防止占用多余空间
	extern bank3 int gAdcFilterBackup_ch1[SMOOTH_MAX_LEVEL_CH1];  //滤波缓存数据
	extern bank1 int gRawdataBackup_ch1[RAWDATA_BACKUP_NUM];  //rawdata缓存数据
#endif

extern int Get_Rawdata(char ch_num);
extern int  Smooth_Filtering(int data,bank3 int *buf, char len,char on_off_maxmin);
extern void Rawdata_Bankup(int data,bank1 int *buf);
void RawData_Process(void);
#endif